<template>
  <page-meta :root-font-size="globalData.fontsize + 'px'" user-scalable="no" viewport-fit="cover" style="display: block"></page-meta>
  <view class="h100p">
    <view :style="globalData.appStyle.navStyle">
      <uni-nav-bar :height="globalData.navBarInfo.height" fixed backgroundColor="#FF7C00">
        <block slot="left">
          <uni-icons color="white" class="icon-left" @click="navigateBackPage" type="left" size="23"></uni-icons>
        </block>
        <block>
          <view class="leftLabel cWH">外部链接</view>
        </block>
      </uni-nav-bar>
    </view>
    <view :style="globalData.appStyle.contentStyle">
      <web-view :src="src" :webview-styles="webviewStyles" :fullscreen="false" />
    </view>
  </view>
</template>
<script>
import commonMxins from '@/mixins/common.js';
export default {
  mixins: [commonMxins],
  data() {
    return {
      title: '',
      src: '',
      webviewStyles: {
        width: '100%',
        height: '100%'
      }
    };
  },
  onLoad(options) {
    this.src = options?.src ?? '';
  },
  methods: {
    // 回退
    navigateBackPage() {
      uni.navigateBack({ delta: 1 });
    }
  }
};
</script>

<style lang="scss" scoped>
.leftLabel {
  display: block;
  width: 100%;
  font-size: 16rem;
  font-weight: 700;
  line-height: 40rem;
  color: rgba(255, 255, 255, 1);
  text-align: center;
}
</style>
